package website.haicheng.server.util;

import cn.hutool.core.util.StrUtil;
import website.haicheng.server.common.exceptions.CommonException;

/**
 * @Author: 582895699@qq.com
 * @Desctription: 断言类
 * @Date: Created in 2021/12/2 11:28
 */
public class Assert {

    public void isBlack(String string, String message) {
        if (StrUtil.isBlank(string)) {
            throw new CommonException(message);
        }
    }

    public void isTrue(boolean bool, String message) {
        if (bool) {
            throw new CommonException(message);
        }
    }
}
